package com.ice.work.moment.facade.ticket.controller;


import com.honeybee.cloud.framework.common.annotation.ApiVersion;
import com.honeybee.cloud.framework.common.response.ResponseEntity;
import com.ice.work.moment.facade.ticket.controller.fallback.StationHystrixFallbackFactory;
import com.ice.work.moment.facade.ticket.vo.StationVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @Description 12306 station
 * @Author DELL
 * @Create 2019-04-29
 * @Since 1.0.0
 */
@SuppressWarnings("all")
@FeignClient(value = "moment-ticket-v1", fallbackFactory = StationHystrixFallbackFactory.class)
@RequestMapping("ticket-station/{version}")
@ApiVersion
public interface IStationController {

    /**
     * 爬取全部车站信息
     *
     * @return
     */
    @RequestMapping(name = "爬取全部车站信息", value = "crawling-station", method = RequestMethod.POST)
    @ApiVersion(value=2)
    ResponseEntity<Void> crawlingStation();

    /**
     * 获取车站信息
     *
     * @return
     */
    @RequestMapping(name = "获取车站信息", value = "station-detail", method = RequestMethod.POST)
    @ApiVersion(value=2)
    ResponseEntity<List<StationVO>> getStations();
}
